/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.poss.api.domain;

import java.util.Date;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author sampath 
 */
@Entity
public class ItemsInStock {
    private long itemsInStockId;
    private double itemsInStockMinAmountToWholeSale;
    private double itemsInStockRetailSellingPrice;
    private double itemsInStockRowPrice;
    private int itemsInStockNumberOfItems;
    private double itemsInStockWholeSalePercentage;
    private double itemsInStockRetailPercentage;
    private double itemsInStockWholeSaleSellingPrice;
    private Date itemsInStockDispatchedDate;
    private Items itemsInStockItem;
    private List<Sale> itemsInStockSales;

    @OneToMany(targetEntity=Sale.class, mappedBy="soldItem", cascade=CascadeType.ALL, fetch=FetchType.LAZY) 
    public List<Sale> getItemsInStockSales() {
        return itemsInStockSales;
    }

    public void setItemsInStockSales(List<Sale> itemsInStockSales) {
        this.itemsInStockSales = itemsInStockSales;
    }

    @ManyToOne
    @JoinColumn(name="itemId")
    public Items getItemsInStockItem() {
        return itemsInStockItem;
    }

    public void setItemsInStockItem(Items itemsInStockItem) {
        this.itemsInStockItem = itemsInStockItem;
    }
    
    

    @Temporal(TemporalType.TIMESTAMP)
    public Date getItemsInStockDispatchedDate() {
        return itemsInStockDispatchedDate;
    }

    public void setItemsInStockDispatchedDate(Date itemsInStockDispatchedDate) {
        this.itemsInStockDispatchedDate = itemsInStockDispatchedDate;
    }

    @Id
    @GeneratedValue
    public long getItemsInStockId() {
        return itemsInStockId;
    }

    public void setItemsInStockId(long itemsInStockId) {
        this.itemsInStockId = itemsInStockId;
    }

    public double getItemsInStockMinAmountToWholeSale() {
        return itemsInStockMinAmountToWholeSale;
    }

    public void setItemsInStockMinAmountToWholeSale(double itemsInStockMinAmountToWholeSale) {
        this.itemsInStockMinAmountToWholeSale = itemsInStockMinAmountToWholeSale;
    }

    public int getItemsInStockNumberOfItems() {
        return itemsInStockNumberOfItems;
    }

    public void setItemsInStockNumberOfItems(int itemsInStockNumberOfItems) {
        this.itemsInStockNumberOfItems = itemsInStockNumberOfItems;
    }

    public double getItemsInStockRetailPercentage() {
        return itemsInStockRetailPercentage;
    }

    public void setItemsInStockRetailPercentage(double itemsInStockRetailPercentage) {
        this.itemsInStockRetailPercentage = itemsInStockRetailPercentage;
    }

    public double getItemsInStockRetailSellingPrice() {
        return itemsInStockRetailSellingPrice;
    }

    public void setItemsInStockRetailSellingPrice(double itemsInStockRetailSellingPrice) {
        this.itemsInStockRetailSellingPrice = itemsInStockRetailSellingPrice;
    }

    public double getItemsInStockRowPrice() {
        return itemsInStockRowPrice;
    }

    public void setItemsInStockRowPrice(double itemsInStockRowPrice) {
        this.itemsInStockRowPrice = itemsInStockRowPrice;
    }

    public double getItemsInStockWholeSalePercentage() {
        return itemsInStockWholeSalePercentage;
    }

    public void setItemsInStockWholeSalePercentage(double itemsInStockWholeSalePercentage) {
        this.itemsInStockWholeSalePercentage = itemsInStockWholeSalePercentage;
    }

    public double getItemsInStockWholeSaleSellingPrice() {
        return itemsInStockWholeSaleSellingPrice;
    }

    public void setItemsInStockWholeSaleSellingPrice(double itemsInStockWholeSaleSellingPrice) {
        this.itemsInStockWholeSaleSellingPrice = itemsInStockWholeSaleSellingPrice;
    }
    
    

      
}
